from pathlib import Path

CWD_PATH = Path.cwd()
MODULE_PATH = Path(__file__).parent.parent

# 日志路径相关常量
PERFORMANCE_LOG_DIR = 'performance_log'
GENERAL_LOG_FILE = 'performance_test.log'
SAMPLE_DATA_DIR = 'sample'
DETAIL_DATA_DIR = 'detail'
NETWORK_MONITOR_TYPE = 'network_monitor'
RESOURCE_MONITOR_TYPE = 'resource_monitor'

# 网络监控使用的常量
# 测试用例列表配置文件路径
TESTCASE_LIST_PATH = MODULE_PATH / 'testcases' / 'network_testcase_list.yaml'

# 资源监控使用的常量
# kubeconfig文件本地路径
KUBECONFIG_PATH = CWD_PATH / 'kubeconfig'
# 监控Pod列表配置文件路径
POD_CATEGORY_PATH = MODULE_PATH / 'testcases' / 'resourse_pod_category.yaml'
# 资源监控需要在 当前时间 + delay 这个时间内随机启动。单位是 hour。
RESOURCE_MONITOR_DELAY_PERIOD = 0.1
# 资源监控采集集群数据的间隔时间
RESOURCE_MONITOR_INTERVAL = 3
# 资源监控采集次数
RESOURCE_MONITOR_ROUND = 20
# 资源监控采集失败最大次数
RESOURCE_MONITOR_FAILED_THRESHOLD = 1
# 资源监控详细日志文件名中的测试用例名字
RESOURCE_MONITOR_TASK_CASE_NAME = 'monitor_resource'
# 特性分类常量
FEATURE_KUBERNETES = "kubernetes"
FEATURE_OPENFUYAO = "openfuyao"
FEATURE_COLOCATION = "colocation"
FEATURE_NUMA = "numa"
FEATURE_MANYCORE = "manycore"
FEATURE_RAY = "ray"
FEATURES = [FEATURE_COLOCATION]